
$(function () {
    var qrCode = GetQueryString("qrCode");
    var wjId = GetQueryString("wjId");
    var meetNum = GetQueryString("meetNum");
    if (wjId != null && wjId != "" && wjId != undefined && wjId != "undefined" && wjId != "") {
        $("#wjId").val(wjId);
    }
    if (meetNum != null && meetNum != "" && meetNum != undefined && meetNum != "undefined" && meetNum != "" && meetNum != "null") {
        $("#wjId").val(meetNum);
    }
    $("#qrCode").val(qrCode);
    $("#pic").on("change", function (e) {
        var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files;
        // for (var i = 0, len = files.length; i < len; ++i) {
        var file = files[0];
        if (url) {
            src = url.createObjectURL(file);
        } else {
            src = e.target.result[0];
        }
        $("#pUrl").attr('src', src);
        // }
    });
    //取消时
    $("#cancelAdd").on("click", function () {
        window.history.go(-1);
    })
});
$("#addData").on("click", function () {
    $("#addForm").attr("action", getAdminIP() + "qdArticles");
    $("#addForm").submit();
})
